1. Field of the Invention
This invention relates to a character recognition method and a character recognition apparatus wherein a character string written on paper or a hand-written character string of words and so forth are optically read in by an optical sensor and a recording medium on which a character recognition program for carrying out the character recognition method is recorded.
2. Description of the Related Art
Conventionally, in a character recognition apparatus of the type mentioned, in order to cut out a character correctly from a character string or in order to extract a stable feature from a character image and recognize the character correctly, slant correction processing of the character is performed based on some evaluation value which indirectly indicates a slant of the character which is one of important factors of deformation of the character. For example, in a character recognition apparatus of the type which effects slant correction processing, a directionality of a character is checked using a chain code histogram, and the direction which exhibits the highest frequency is determined as a direction of the slant of the character. Then, the slant of the character is corrected based on the direction. Another character recognition apparatus is disclosed in Japanese Patent Laid-Open Application No. Heisei 5-114046 under the title of "Method and Apparatus for Normalizing the Characteristic Slant Angle of a Hand-Written Character". In the method and apparatus disclosed in the document, the entropy of a projection histogram of an input image regarding a predicted direction of the slant is calculated, and the slant angle with which the entropy exhibits a minimum value is determined. Then, the position of the input image is converted by an angle equal to the slant angle to correct the slant of the character.
However, the conventional slant correction processing basically takes a policy that it is assumed that a large number of strokes in a direction (hereinafter referred to as vertical direction) perpendicular to the direction of a character string are present in an input character image and the image is corrected so that the large number of existing vertical strokes may be directed in the vertical direction. In other words, correction is performed using such an evaluation value which is high in the vertical direction.
Accordingly, if such a character image which includes many vertical strokes as shown in FIG. 3 is inputted, then since the evaluation values exhibit high values only in the proximity of an actual slant angle X as seen in FIG. 4, estimation of the slant angle can be performed accurately and appropriate correction can be performed.
However, if a character image which does not include a very large number of vertical strokes as seen in FIG. 5 is inputted, then since the evaluation values do not always exhibit conspicuous values in the proximity of the actual slant angle X as seen in FIG. 6, there is a problem in that an error occurs in estimation of the slant angle and appropriate correction cannot be effected. For example, it sometimes occurs that, as seen in FIG. 7, as a result of an error in estimation of the slant angle, correction which increases the slant is performed.
In particular, there is a problem in that, where the evaluation value indicative of a slant of a character does not assume a conspicuous value only in the proximity of a particular angle but no very conspicuous variation appears even if the angle is varied, it is difficult to estimate the slant angle of the character, and wrong slant correction is likely to be performed. Such inappropriate correction has a bad influence on later character segmentation, feature extraction and discrimination.